import request from '@/utils/request'

// 获取-权限点列表
export function getPermission() {
  return request({
    url: `/sys/permission`
  })
}

// 删除权限点
export function delPermission(id) {
  return request({
    method: 'DELETE',
    url: `/sys/permission/${id}`
  })
}

// 增加权限点
export function addPermission(data) {
  return request({
    method: 'post',
    url: `/sys/permission`,
    data
  })
}

// 权限点详情
export function onePermission(id) {
  return request({
    url: `/sys/permission/${id}`
  })
}

// 修改权限点详情
export function editaddPermission(data) {
  return request({
    method: 'put',
    url: `/sys/permission/${data.id}`,
    data
  })
}


